package cn.hdufocus.focus_helper.dao;

import cn.hdufocus.focus_helper.entity.Reservation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface ReservationDao extends JpaRepository<Reservation,Long> {
    List<Reservation> findAllByTimeBetween(Date fromTime, Date toTime);
    List<Reservation> findAllByStatusBefore(int status);
    List<Reservation> findAllByStatusBetween(int status1,int status2);
    List<Reservation> findAllByPhone(String phone);
    List<Reservation> findAllByStatus(int status);
}
